Player1 将由“W”,“A” 和 “D”键控制。
- 使用 My Key Press ,当按下“W”键时,使 player1 .move_up() 30 像素。
- 使用 My Key Press ,当按下“A”键时,使 player1 .move_left() 30 像素。
- 使用 My Key Press ,当按下“D”键时,使 player1 .move_right() 30 像素。
不要忘记在事件定义中更改键盘字母的一次,并在事件处理器中更改两次。
To navigate the page using the TAB key, first press ESC to exit the code editor.